package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class Graphics extends AppCompatActivity {
    private WebView webView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_graphics);
        webView=findViewById(R.id.webiv);
        WebSettings webSettings = webView.getSettings();
        webSettings.setJavaScriptEnabled(true); // 允许JavaScript
        webSettings.setDomStorageEnabled(true); // 启用DOM存储

        // 在WebView中加载URL
        webView.loadUrl("http://1.95.14.5:18082/");

        // 设置WebView的WebViewClient，用于处理页面加载和其他回调事件
        webView.setWebViewClient(new WebViewClient());
    }
}